<template>
  <div class="work-record-page">
    <div class="work-record-header">
      <h2>工作记录</h2>
    </div>
    <el-skeleton v-if="loading" rows="4" animated style="margin: 32px 0" />
    <div v-else>
      <div v-if="records.length === 0" class="work-record-empty">
        <el-icon><Document /></el-icon>
        <div class="empty-text">暂无工作记录</div>
      </div>
      <div v-else>
        <div class="work-record-card-list">
          <div class="work-record-card" v-for="item in records" :key="item.id" @click="handleRecordClick(item)">
            <div class="record-id">#{{ item.id }}</div>
            <div class="record-status" :style="{color: infoStatusMap[item.status]?.color, background: infoStatusMap[item.status]?.bg}">
              {{ infoStatusMap[item.status]?.text || '未知' }}
            </div>
            <div class="record-picture">
              <el-image v-if="item.picture" :src="item.picture" fit="cover" class="record-img" />
              <div v-else class="record-img-placeholder"><el-icon><Camera /></el-icon></div>
            </div>
            <div class="record-remark">{{ item.remarks || item.remark || '无备注' }}</div>
            <div class="record-region">{{ item.regionName || '未知区域' }}</div>
          </div>
        </div>
        <el-pagination
          v-if="total > pageSize"
          :current-page="pageNum"
          :page-size="pageSize"
          :total="total"
          layout="prev, pager, next"
          @current-change="handlePageChange"
          style="margin-top: 24px; display: flex; justify-content: center;"
        />
      </div>
    </div>
    
    <!-- 详情弹窗 -->
    <el-dialog v-model="detailDialogVisible" width="430px" :close-on-click-modal="true" class="info-detail-dialog" :show-close="true" @close="resetDetailDialog" :footer="null">
      <template #title>
        <div class="info-detail-title">详情</div>
      </template>
      <el-skeleton v-if="detailLoading" rows="6" animated style="margin: 32px 0" />
      <div v-if="detailData" class="info-detail-content">
        <div class="info-detail-main-img-wrap">
          <div class="info-detail-main-img-interactive">
            <el-image
              v-if="detailData.picture"
              :src="detailData.picture"
              fit="cover"
              :preview-src-list="[detailData.picture]"
              :initial-index="0"
              class="info-detail-main-img-el"
              :style="{ width: '220px', height: '120px' }"
            />
            <div v-else class="info-detail-main-img-placeholder">
              <el-icon><Camera /></el-icon>
              <span>暂无图片</span>
            </div>
          </div>
          <span class="info-detail-status-badge-float" :class="'badge-status-' + detailData.status">
            {{ infoStatusMap[detailData.status]?.text || '未知' }}
          </span>
        </div>
        <div class="info-detail-section">
          <div class="info-detail-remarks-content">
            <div class="info-detail-remarks-text">
              {{ detailData.remarks || detailData.remark || '暂无备注' }}
            </div>
          </div>
        </div>
        <div class="info-detail-section">
          <div class="info-detail-section-title">检测信息</div>
          <div class="info-detail-row">
            <span class="info-detail-label">检测人员</span>
            <span class="info-detail-value">{{ detailDetectionUser?.nickName || '-' }}</span>
            <span class="info-detail-label">员工编号</span>
            <span class="info-detail-value">{{ detailData.detectionBy || '-' }}</span>
          </div>
          <div class="info-detail-row">
            <span class="info-detail-label">检测时间</span>
            <span class="info-detail-value">{{ detailData.detectionTime ? (detailData.detectionTime.split('T')[0] + ' ' + (detailData.detectionTime.split('T')[1]||'').split('+')[0]) : '-' }}</span>
          </div>
          <div class="info-detail-album-row">
            <span class="info-detail-label">检测相册</span>
            <div class="info-detail-album-list" style="position:relative;display:flex;align-items:center;">
              <el-image
                v-for="(img, idx) in (inspecAlbumExpanded ? (detailData.cInspecAlbumList || []) : (detailData.cInspecAlbumList || []).slice(0,3))"
                :key="idx"
                :src="img.url || img.picture || ''"
                fit="cover"
                class="info-detail-album-img"
                :preview-src-list="(detailData.cInspecAlbumList||[]).map(i=>i.url||i.picture||'')"
                :initial-index="idx"
                @click.stop
              />
              <span v-if="!(detailData.cInspecAlbumList && detailData.cInspecAlbumList.length)">无</span>
              <el-icon
                v-if="detailData.cInspecAlbumList && detailData.cInspecAlbumList.length > 3"
                class="album-expand-arrow"
                :class="{expanded: inspecAlbumExpanded}"
                style="margin-left:8px;cursor:pointer;"
                @click.stop="inspecAlbumExpanded = !inspecAlbumExpanded"
              >
                <svg width="38" height="38" viewBox="0 0 38 38">
                  <defs>
                    <linearGradient id="arrowBlue" x1="0" y1="0" x2="1" y2="1">
                      <stop offset="0%" stop-color="#60a5fa"/>
                      <stop offset="100%" stop-color="#1e3a8a"/>
                    </linearGradient>
                  </defs>
                  <circle cx="19" cy="19" r="18" fill="#eaf3fd" fill-opacity="0.85"/>
                  <circle cx="19" cy="19" r="18" fill="url(#arrowBlue)" fill-opacity="0.12"/>
                  <path d="M13 17l6 6 6-6" stroke="url(#arrowBlue)" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
                </svg>
              </el-icon>
            </div>
          </div>
        </div>
        <div class="info-detail-section">
          <div class="info-detail-section-title">维修信息</div>
          <div class="info-detail-row">
            <span class="info-detail-label">维修人员</span>
            <span class="info-detail-value">{{ detailMaintenanceUser?.nickName || '-' }}</span>
            <span class="info-detail-label">员工编号</span>
            <span class="info-detail-value">{{ detailData.maintenanceBy || '-' }}</span>
          </div>
          <div class="info-detail-row">
            <span class="info-detail-label">维修时间</span>
            <span class="info-detail-value">{{ detailData.maintenanceTime ? (detailData.maintenanceTime.split('T')[0] + ' ' + (detailData.maintenanceTime.split('T')[1]||'').split('+')[0]) : '-' }}</span>
          </div>
          <div class="info-detail-album-row">
            <span class="info-detail-label">维修相册</span>
            <div class="info-detail-album-list" style="position:relative;display:flex;align-items:center;">
              <el-image
                v-for="(img, idx) in (maintainAlbumExpanded ? (detailData.cMaintainAlbumList || []) : (detailData.cMaintainAlbumList || []).slice(0,3))"
                :key="idx"
                :src="img.url || img.picture || ''"
                fit="cover"
                class="info-detail-album-img"
                :preview-src-list="(detailData.cMaintainAlbumList||[]).map(i=>i.url||i.picture||'')"
                :initial-index="idx"
                @click.stop
              />
              <span v-if="!(detailData.cMaintainAlbumList && detailData.cMaintainAlbumList.length)">无</span>
              <el-icon
                v-if="detailData.cMaintainAlbumList && detailData.cMaintainAlbumList.length > 3"
                class="album-expand-arrow"
                :class="{expanded: maintainAlbumExpanded}"
                style="margin-left:8px;cursor:pointer;"
                @click.stop="maintainAlbumExpanded = !maintainAlbumExpanded"
              >
                <svg width="38" height="38" viewBox="0 0 38 38">
                  <defs>
                    <linearGradient id="arrowBlue2" x1="0" y1="0" x2="1" y2="1">
                      <stop offset="0%" stop-color="#60a5fa"/>
                      <stop offset="100%" stop-color="#1e3a8a"/>
                    </linearGradient>
                  </defs>
                  <circle cx="19" cy="19" r="18" fill="#eaf3fd" fill-opacity="0.85"/>
                  <circle cx="19" cy="19" r="18" fill="url(#arrowBlue2)" fill-opacity="0.12"/>
                  <path d="M13 17l6 6 6-6" stroke="url(#arrowBlue2)" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
                </svg>
              </el-icon>
            </div>
          </div>
        </div>
      </div>
      <div v-else class="info-detail-empty">暂无详细信息</div>
    </el-dialog>
  </div>
</template>

<script setup>
import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus'
import { listInformation, getInformation } from '@/api/information/information'
import { getRegion } from '@/api/region/region'
import { getUser } from '@/api/system/user'
// 夜间模式已禁用
import { getUserProfile, getAuthRole } from '@/api/system/user'
import { Camera, Document } from '@element-plus/icons-vue'

const loading = ref(true)
const records = ref([])
const total = ref(0)
const pageNum = ref(1)
const pageSize = ref(8)

const userInfo = ref({
  userId: null,
  username: "",
  realName: "",
  roleId: null,
  roleName: "",
  roleKey: ""
})
const userRoleKey = ref("")

const loadUserInfoAndRole = async () => {
  try {
    // 1. 优先API获取
    const profileRes = await getUserProfile()
    if (profileRes.code === 200 && profileRes.data) {
      const profile = profileRes.data
      userInfo.value = {
        userId: profile.userId,
        username: profile.userName || profile.username || "",
        realName: profile.realName || profile.nickName || profile.nickname || profile.userName || "",
        roleId: profile.roleId || profile.role_id || null,
        roleName: profile.roleName || "",
        roleKey: ""
      }
      // 2. 再查角色
      if (userInfo.value.userId) {
        const roleRes = await getAuthRole(userInfo.value.userId)
        if (roleRes.code === 200 && roleRes.user.roles && roleRes.user.roles.length > 0) {
          userInfo.value.roleKey = roleRes.user.roles[0].roleKey || ""
          userInfo.value.roleName = roleRes.user.roles[0].roleName || ""
          userRoleKey.value = userInfo.value.roleKey
        }
      }
    }
    // 3. 回退localStorage
    if (!userInfo.value.userId) {
      const local = localStorage.getItem('userInfo')
      if (local) {
        const u = JSON.parse(local)
        userInfo.value.userId = u.userId
        userInfo.value.username = u.userName || u.username || ""
        userInfo.value.realName = u.realName || u.nickName || u.nickname || u.userName || ""
        userInfo.value.roleId = u.roleId || u.role_id || null
        userInfo.value.roleName = u.roleName || ""
        userInfo.value.roleKey = u.roleKey || ""
        userRoleKey.value = u.roleKey || ""
      }
    }
  } catch (e) {
    // fallback
  }
}

const fetchRecords = async () => {
  loading.value = true
  let query = {
    pageNum: pageNum.value,
    pageSize: pageSize.value
  }
  // 角色判断用userRoleKey
  if ([
    'inspector', 'inspec', 'inspect', '巡检', '巡检人员'
  ].includes(userRoleKey.value)) {
    query.detectionBy = userInfo.value.userId
  } else if ([
    'maintainer', 'maintain', 'maintenance', '维修', '维修人员'
  ].includes(userRoleKey.value)) {
    query.maintenanceBy = userInfo.value.userId
  }
  try {
    const res = await listInformation(query)
    if (res.code === 200 && Array.isArray(res.rows)) {
      // 为每条记录添加区域名称
      const recordsWithRegion = await Promise.all(
        res.rows.map(async (record) => {
          try {
            if (record.regionId) {
              const regionRes = await getRegion(record.regionId)
              if (regionRes.code === 200 && regionRes.data) {
                return {
                  ...record,
                  regionName: regionRes.data.name || regionRes.data.regionName || '未知区域'
                }
              }
            }
            return {
              ...record,
              regionName: '未知区域'
            }
          } catch (error) {
            console.error(`获取区域${record.regionId}信息失败:`, error)
            return {
              ...record,
              regionName: '未知区域'
            }
          }
        })
      )
      
      records.value = recordsWithRegion
      total.value = res.total || 0
    } else {
      records.value = []
      total.value = 0
    }
  } catch (e) {
    ElMessage.error('获取工作记录失败')
    records.value = []
    total.value = 0
  }
  loading.value = false
}

const handlePageChange = (val) => {
  pageNum.value = val
  fetchRecords()
}

// 状态映射与 RegionSafety 一致
const infoStatusMap = {
  0: { text: '待维修', color: '#ff4d4f', bg: 'rgba(255,77,79,0.10)' },
  1: { text: '已维修', color: '#52c41a', bg: 'rgba(82,196,26,0.10)' },
  2: { text: '待审核', color: '#faad14', bg: 'rgba(250,173,20,0.10)' },
  3: { text: '不通过', color: '#8c8c8c', bg: 'rgba(140,140,140,0.10)' },
  4: { text: '已接取', color: '#1890ff', bg: 'rgba(24,144,255,0.10)' }
}

// 详情弹窗相关
const detailDialogVisible = ref(false)
const detailLoading = ref(false)
const detailData = ref(null)
const detailDetectionUser = ref(null)
const detailMaintenanceUser = ref(null)

// 相册展开/收起状态
const inspecAlbumExpanded = ref(false)
const maintainAlbumExpanded = ref(false)

// 处理记录点击
const handleRecordClick = async (item) => {
  detailDialogVisible.value = true
  detailLoading.value = true
  detailData.value = null
  detailDetectionUser.value = null
  detailMaintenanceUser.value = null
  
  try {
    const res = await getInformation(item.id)
    if (res.code === 200 && res.data) {
      detailData.value = res.data
      
      // 查询检测人员
      if (res.data.detectionBy) {
        try {
          const userRes = await getUser(res.data.detectionBy)
          if (userRes.code === 200 && userRes.data) {
            detailDetectionUser.value = userRes.data
          }
        } catch (error) {
          console.error('获取检测人员信息失败:', error)
        }
      }
      
      // 查询维修人员
      if (res.data.maintenanceBy) {
        try {
          const userRes = await getUser(res.data.maintenanceBy)
          if (userRes.code === 200 && userRes.data) {
            detailMaintenanceUser.value = userRes.data
          }
        } catch (error) {
          console.error('获取维修人员信息失败:', error)
        }
      }
    }
  } catch (error) {
    console.error('获取详情失败:', error)
    ElMessage.error('获取详情失败')
  } finally {
    detailLoading.value = false
  }
}

// 重置详情弹窗
const resetDetailDialog = () => {
  detailDialogVisible.value = false
  detailData.value = null
  detailDetectionUser.value = null
  detailMaintenanceUser.value = null
  inspecAlbumExpanded.value = false
  maintainAlbumExpanded.value = false
}

onMounted(async () => {
  await loadUserInfoAndRole()
  fetchRecords()
})
</script>

<style lang="scss" scoped>
.work-record-page {
  min-height: 100vh;
  padding-top: 60px;
  padding-bottom: 90px;
  // 粘土拟态背景
  background: #f5f5f7;
  margin: -20px;
  padding-left: 0;
  padding-right: 0;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  &.dark-mode {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
  }
}
.work-record-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  // 粘土拟态头部
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 16px;
  z-index: 1000;
  box-shadow: 
    inset 2px 2px 5px rgba(0, 0, 0, 0.1),
    inset -2px -2px 5px rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(0, 0, 0, 0.05);
  
  h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    line-height: 1.4;
  }
}
.work-record-empty {
  text-align: center;
  color: #bbb;
  font-size: 18px;
  padding: 60px 0;
  .el-icon {
    font-size: 40px;
    margin-bottom: 12px;
  }
  .empty-text {
    font-size: 18px;
    margin-top: 8px;
  }
}
.work-record-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 auto;
  max-width: 700px;
  padding: 16px;
}
.work-record-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  /* 粘土拟态卡片效果 */
  background: #f5f5f7;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-height: 120px;
  height: 120px;
  margin-bottom: 0;
  padding: 0 20px;
  gap: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 
    inset 2px 2px 5px rgba(0, 0, 0, 0.1),
    inset -2px -2px 5px rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(0, 0, 0, 0.05);
  
  &:hover {
    box-shadow: 
      inset 1px 1px 3px rgba(0, 0, 0, 0.15),
      inset -1px -1px 3px rgba(255, 255, 255, 1),
      0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
  }
  
  &:active {
    box-shadow: 
      inset 3px 3px 8px rgba(0, 0, 0, 0.15),
      inset -3px -3px 8px rgba(255, 255, 255, 1);
    transform: translateY(0px);
  }
}
.record-id {
  min-width: 48px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}
.record-status {
  min-width: 70px;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 6px 14px;
  text-align: center;
  /* 粘土拟态状态标签 */
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: #6b7280;
  transition: all 0.3s ease;
  box-shadow: 
    inset 1px 1px 2px rgba(0, 0, 0, 0.05),
    inset -1px -1px 2px rgba(255, 255, 255, 0.8);
}
.record-picture {
  min-width: 96px;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.record-img, .record-img-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
}
.record-img-placeholder {
  /* 粘土拟态图片占位符 */
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 1px 1px 2px rgba(0, 0, 0, 0.05),
    inset -1px -1px 2px rgba(255, 255, 255, 0.8);
  .el-icon { font-size: 24px; }
}
.record-remark {
  flex: 1;
  color: #6b7280;
  font-size: 1rem;
  padding-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.record-region {
  min-width: 80px;
  color: #6b7280;
  font-size: 0.95rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* 粘土拟态区域标签 */
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 
    inset 1px 1px 2px rgba(0, 0, 0, 0.05),
    inset -1px -1px 2px rgba(255, 255, 255, 0.8);
}
@media (max-width: 768px) {
  .work-record-page {
    padding-top: 56px;
    padding-bottom: 100px;
    margin: -15px;
    padding-left: 0;
    padding-right: 0;
  }
  
  .work-record-header {
    padding: 12px 16px;
    
    h2 {
      font-size: 16px;
    }
  }
  
  .work-record-card-list {
    padding: 12px;
    gap: 12px;
  }
  
  .work-record-card {
    min-height: 90px;
    height: 90px;
    padding: 0 12px;
    gap: 12px;
    border-radius: 12px;
  }
  .record-picture, .record-img, .record-img-placeholder {
    width: 66px;
    height: 66px;
    min-width: 66px;
  }
  .record-id, .record-status {
    font-size: 0.95rem;
    min-width: 36px;
  }
  .record-remark {
    font-size: 0.95rem;
    min-width: 40px;
  }
  .record-region {
    font-size: 0.9rem;
    min-width: 80px;
    padding: 4px 8px;
  }
}

// 详情弹窗样式
.info-detail-dialog {
  .el-dialog__body {
    padding: 24px 32px 24px 32px;
    background: #f8fafc;
    border-radius: 18px;
  }
  .info-detail-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #222;
    margin: 0 auto 8px auto;
    background: linear-gradient(90deg, #60a5fa 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-shadow: 0 2px 12px #60a5fa22;
  }
}

.info-detail-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
  padding-bottom: 8px;
  
  .info-detail-main-img-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 8px;
    
    .info-detail-main-img-interactive {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      min-height: 120px;
    }
    
    .info-detail-main-img-el {
      width: 220px !important;
      height: 120px !important;
      min-width: 220px !important;
      min-height: 120px !important;
      max-width: 220px !important;
      max-height: 120px !important;
      border-radius: 14px;
      box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
      object-fit: contain;
      background: #f0f0f0;
      border: 2px solid #fff;
      transition: box-shadow 0.2s, border 0.2s;
      cursor: pointer;
      display: block;
      overflow: hidden;
      position: relative;
      
      :deep(img) {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        border-radius: 14px;
        display: block;
      }
    }
    
    .info-detail-main-img-placeholder {
      width: 220px;
      height: 120px;
      border-radius: 14px;
      background: #f5f5f5;
      border: 2px dashed #ddd;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: #999;
      
      .el-icon {
        font-size: 32px;
        margin-bottom: 8px;
      }
      
      span {
        font-size: 14px;
      }
    }
    
    .info-detail-status-badge-float {
      position: absolute;
      right: 0;
      top: 0;
      transform: translate(30%,-50%);
      font-size: 1.08rem;
      padding: 7px 22px;
      border-radius: 16px;
      min-width: 60px;
      box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10);
      margin-left: 0;
      margin-right: 0;
      z-index: 2;
      color: #fff;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-shadow: 0 2px 8px rgba(0,0,0,0.18), 0 1px 0 #3332;
      background: linear-gradient(90deg, #60a5fa 0%, #818cf8 100%);
    }
    
    .badge-status-0.info-detail-status-badge-float {
      background: linear-gradient(90deg, #ff5f8f 0%, #ff3c6f 100%) !important;
      box-shadow: 0 2px 12px 0 rgba(255,95,143,0.18);
    }
    .badge-status-1.info-detail-status-badge-float {
      background: linear-gradient(90deg, #60a5fa 0%, #818cf8 100%) !important;
      box-shadow: 0 2px 12px 0 rgba(96,165,250,0.18);
    }
    .badge-status-2.info-detail-status-badge-float {
      background: linear-gradient(90deg, #ffe066 0%, #ffd700 100%) !important;
      color: #7c5a00 !important;
      box-shadow: 0 2px 12px 0 rgba(255,224,102,0.18);
      text-shadow: 0 2px 8px rgba(255,224,102,0.18), 0 1px 0 #3332;
    }
    .badge-status-3.info-detail-status-badge-float {
      background: linear-gradient(90deg, #bdbdbd 0%, #757575 100%) !important;
      color: #fff !important;
      box-shadow: 0 2px 12px 0 rgba(189,189,189,0.18);
      text-shadow: 0 2px 8px rgba(189,189,189,0.18), 0 1px 0 #3332;
    }
  }
  
  .info-detail-section {
    /* 新拟物化凸起效果（参考图片风格） */
    background: #ffffff;
    border-radius: 13px;
    box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.5),
                -4px -4px 8px rgba(255, 255, 255, 0.9);
    border: none;
    padding: 14px 14px 10px 18px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 4px solid rgba(64, 158, 255, 0.3);
    
    .info-detail-section-title {
      font-size: 1.05rem;
      font-weight: 700;
      color: #60a5fa;
      margin-bottom: 6px;
      letter-spacing: 1px;
    }
  }
  
  .info-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    
    .info-detail-label {
      color: #888;
      font-weight: 500;
      min-width: 70px;
    }
    
    .info-detail-value {
      color: #222;
      font-weight: 600;
      min-width: 40px;
    }
  }
  
  .info-detail-album-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    
    .info-detail-label {
      color: #888;
      font-weight: 500;
      min-width: 70px;
      margin-top: 4px;
    }
    
    .info-detail-album-list {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      
      .info-detail-album-img {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        min-height: 70px !important;
        max-width: 70px !important;
        max-height: 70px !important;
        border-radius: 8px;
        object-fit: contain;
        background: #f0f0f0;
        cursor: pointer;
        transition: box-shadow 0.2s;
        display: block;
        overflow: hidden;
        
        :deep(img) {
          width: 100% !important;
          height: 100% !important;
          object-fit: contain !important;
          border-radius: 8px;
          display: block;
        }
      }
    }
  }
  
  .info-detail-remarks-content {
    flex: 1;
    
    .info-detail-remarks-text {
      background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
      border: 1px solid #e9ecef;
      border-radius: 8px;
      padding: 12px;
      min-height: 60px;
      font-size: 15px !important;
      font-weight: 500 !important;
      line-height: 1.6;
      color: #2c3e50 !important;
      white-space: pre-wrap;
      word-break: break-word;
      letter-spacing: 0.3px;
      font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif !important;
      text-shadow: 0 1px 2px rgba(0,0,0,0.1);
      position: relative;
      overflow: hidden;
      
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, #60a5fa 0%, #818cf8 50%, #60a5fa 100%);
        opacity: 0.7;
      }
      
      &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, #60a5fa 50%, transparent 100%);
        opacity: 0.3;
      }
    }
  }
}

.info-detail-empty {
  text-align: center;
  color: #bbb;
  font-size: 16px;
  padding: 40px 0;
}

.album-expand-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 8px 0 rgba(96,165,250,0.10);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  background: transparent;
  
  &:hover {
    background: rgba(96,165,250,0.12);
    box-shadow: 0 4px 16px 0 rgba(96,165,250,0.18);
    transform: scale(1.12) rotate(0deg);
  }
}

.album-expand-arrow.expanded {
  transform: rotate(180deg);
}
</style> 